#ifndef XMLITEM_H
#define XMLITEM_H

#include <QMap>
#include <QString>
#include <QDebug>

#include "globals.h"

class XMLItem
{
public:
    static const QString KEY_DESCRIPTION;
    static const QString KEY_NAME;

    XMLItem();
    explicit XMLItem(const QMap<QString,QString>& values);
    virtual ~XMLItem();
    virtual QString keyValue(const QString& key) const;

    RW(QString,name)
    RW(QString,description)
    RW(bool,isValid)

    bool operator==(const XMLItem& other) const;
    bool operator<(const XMLItem& other) const;
    operator QString() const;
};

uint qHash(const XMLItem& item);

#endif // XMLITEM_H
